﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace KpiConfigProject.Manager
{
    public class DrillManager : AbstractManager
    {
        public override string GetSQL()
        {
            return "select * from ctbDrill";
        }

        public DataTable GetList()
        {
            return base.GetList(GetSQL());
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="addRows"></param>
        /// <param name="modRows"></param>
        /// <param name="delRows"></param>
        /// <returns></returns>
        public bool InsertData(List<DataRowView> addRows, List<DataRowView> modRows, List<DataRowView> delRows)
        {
            bool isSucc = false;
            isSucc = DataBase.DataBaseManager.InsertDataView(addRows);
            if (!isSucc)
                return isSucc;
            isSucc = DataBase.DataBaseManager.UpdateDataView(modRows);
            if (!isSucc)
                return isSucc;
            isSucc = DataBase.DataBaseManager.DeleteDataView(delRows);
            if (!isSucc)
                return isSucc;
            return isSucc;
        }
    }
}
